<?php
if(defined("IZ_ACCNAME")) {
if($_SESSION['authed'] == 1) {
//  header("Location: ".$_SESSION['IZ_CALURL']."index.php");
} else {
  $tabindex = 10;
  if(($_SESSION['IZ_OPT'] & OPT_REG) != 0) { ?>
       <div class="containerbox" id="register">
             <div class="containertitle"><?php echo STR_REGISTER; ?></div>
             <form enctype="multipart/form-data" method="post" action="<?php echo $_SESSION['IZ_CALURL']; ?>index.php" onsubmit="return validate_reg();">
             <table class="fieldstable">
                                      
             <tr><td class="parameter">
               <label for="username"><?php echo STR_USERNAME; ?>&#58;</label>
             </td><td class="setting">
               <input type="text" name="username" id="username" class="inline" size="30" tabindex="<?php echo $tabindex; $tabindex++; ?>" />
               <div class="inlineerror" id="error_username">&nbsp;</div>
             </td></tr>
             
             <tr><td class="parameter">
               <label for="password"><?php echo STR_PASSWORD; ?>&#58;</label>
             </td><td class="setting">
               <input type="password" name="pass" id="pass" class="inline" size="30" tabindex="<?php echo $tabindex; $tabindex++; ?>" />
             </td></tr>
             
             <tr><td class="parameter">
               <label for="confpass"><?php echo STR_CONFIRMPASS; ?>&#58;</label>
             </td><td class="setting">
               <input type="password" name="confpass" id="confpass" class="inline" size="30" tabindex="<?php echo $tabindex; $tabindex++; ?>" />
               <div class="inlineerror" id="error_pass">&nbsp;</div>
             </td></tr>
             
             <?php if($_SESSION['IZ_ITEMCOLORS'] == 'a') { ?>
             <tr><td class="parameter">
               <label for="colour"><?php echo STR_COLOUR; ?>&#58;<br />
               <small><?php echo STR_COLOURDESC ?></small></label>
             </td><td class="setting">
               <div class="inlinecolourpick">
                 <input type="text" name="colour" id="colour" class="inline colourinput" size="30" tabindex="<?php echo $tabindex; $tabindex++; ?>" />
                 <a id="newusercolourpicker" class="colourpicker" title="Pick" tabindex="<?php echo $tabindex; $tabindex++; ?>">&nbsp;&nbsp;</a>
               </div>
             </td></tr>
             <?php $jsfoot = 'new Control.ColorPicker("colour", { "swatch" : "newusercolourpicker" });'."\n";
             } ?>
             
             
             </table>
             <input type="hidden" name="act" value="admin" />
             <input type="hidden" name="act" value="submitreg" />
             <div class="actions">
               <input type="submit" value="<?php echo STR_REGISTER; ?>" name="dummy1" class="nicebutton" tabindex="<?php echo $tabindex; $tabindex++; ?>" />
             </div>
        </form>
        </div>
<?php
  } else {
    iz_inlineerror(ERR_REGDISABLED);
  }
}
} else {
  // Directly accessed
  header('Location: ../');
} ?>